package com.example.demo.controller;

import com.example.demo.mq.FanoutSender;
import org.junit.Test;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.event.TransactionalEventListener;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.stream.StreamSupport;

@RestController
public class FanoutSenderTestController {
    @Autowired
    private FanoutSender sender;
    @GetMapping("FanoutSend")
    public String fanoutSender()throws Exception{
        sender.send();
        return sender.toString();
    }
}
